<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8" import="java.util.*"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ request.getContextPath() + "/";
//response.sendRedirect("common/login");
%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>ArtId</title>
			<script type="text/javascript" src="${path }/resource/js/jquery-2.0.3.js"></script>
			<script type="text/javascript" src="${path }/resource/layer/layer.js"></script>
			<script type="text/javascript" src="${path }/resource/js/mytools.js"></script>
			<link rel="stylesheet" href="${path }/resource/bootstrap/css/bootstrap.min.css" />
			<link rel="stylesheet" href="${path }/resource/bootstrap/css/bootstrap-responsive.min.css" />
	</head>
	<body>
	<div class="container">
		<form  class="form-horizontal" onsubmit="javascripr:return false;" id="from1">
		<input type="hidden" name="id" value="${obj.id}"/> <!--隐藏域id el表达式获取 -->
		<div class="form-group">
		 <label class="col-sm-2 control-label">title:</label>
		 <div class="col-sm-4">
		<input type="text" name="title" class="form-control" value="${obj.title}" id="title"/>
		</div>
		</div>
	  <div class="control-group text-center">
		<div class="controls">
		 <input type="button" value="保存" class="btn btn-default btn-sm" onclick="save()">
		 <input type="reset"  class="btn btn-default btn-sm" value="重置">
        </div>
      </div>
	</form>
	</div>
	<script type="text/javascript">
		function save(){
		mytooljs.initForm({
			idSelecter :"#from1", //表单id选择器
			sendurl:"${path }/user/art/ArtId/addOrModify",//发送请求的地址
			afterload:function(){//请求成功后回调
				alert("保存成功");
				parent.mjs.search();
				parent.layer.closeAll();
			}
		});
		}
		
		
		</script>
	</body>
</html>
